package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerGetGlobalInfomationResponse extends BaseQLResponse
{
    /// <summary>
    /// 总注册数量
    /// </summary>
    public long TotalRegisteredCount;

    /// <summary>
    /// 今日注册数量
    /// </summary>
    public long TodayRegisteredCount;

    /// <summary>
    /// 玩家在线数量
    /// </summary>
    public long UserOnlineCount;

    /// <summary>
    /// 公会数量
    /// </summary>
    public long GuildCount;

    /// <summary>
    /// 封禁的玩家数量
    /// </summary>
    public long BlockUserCount;

    /// <summary>
    /// 大厅金币存量
    /// </summary>
    public long CurrencyStock;

    /// <summary>
    /// 钻石存量
    /// </summary>
    public long DiamondStock;

    /// <summary>
    /// 积分存量
    /// </summary>
    public long IntegralStock;

    /// <summary>
    /// 奖券存量
    /// </summary>
    public long TicketStock;

    /// <summary>
    /// 青铜弹头存量
    /// </summary>
    public long Warhead1Stock;

    /// <summary>
    /// 白银弹头存量
    /// </summary>
    public long Warhead2Stock;

    /// <summary>
    /// 黄金弹头存量
    /// </summary>
    public long Warhead3Stock;

    /// <summary>
    /// 紫金弹头存量
    /// </summary>
    public long Warhead4Stock;

    /// <summary>
    /// 总充值金额，单位分
    /// </summary>
    public long TotalRecharge;

    /// <summary>
    /// 今日充值金额，单位分
    /// </summary>
    public long TodayRecharge;

    /// <summary>
    /// 商人数量
    /// </summary>
    public long BusinessmanCount;

    /// <summary>
    /// 银行金币存量
    /// </summary>
    public long BankCurrencyStock;

    /// <summary>
    /// 全局奖池水位
    /// </summary>
    public long GlobalPrizePool;

    /// <summary>
    /// 全局游戏难度级别，0地域灾难 1非常困难 2困难 3中等 4简单 5分红 6大富豪
    /// </summary>
    public long GlobalGameDifficultyLevel;

    /// <summary>
    /// 自动抽水水位线
    /// </summary>
    public long PrizePoolAutoFetchBoundary;

    /// <summary>
    /// 自动抽水CD，单位秒
    /// </summary>
    public long PrizePoolAutoFetchCD;

    /// <summary>
    /// 自动抽水比例，小数
    /// </summary>
    public String PrizePoolAutoFetchRate;

    /// <summary>
    /// 下次自动抽水时间
    /// </summary>
    public String PrizePoolNextAutoFetchTime;

    /// <summary>
    /// 分红水位线
    /// </summary>
    public long PrizePoolShareBonusBoundary;

    /// <summary>
    /// 分红比例，小数
    /// </summary>
    public String PrizePoolShareBonusRate;

    /// <summary>
    /// 分红时，个人奖池临时增加比例
    /// </summary>
    public String PrizePoolShareBonusAdditionRate;

    /// <summary>
    /// 触发分红的CD，单位秒
    /// </summary>
    public long PrizePoolShareBonusCD;

    /// <summary>
    /// 下次分红时间
    /// </summary>
    public String PrizePoolNextShareBonusTime;

    /// <summary>
    /// 开服以来总抽水
    /// </summary>
    public long TotalPrizePoolFetched;

    /// <summary>
    /// 难度分界线
    /// </summary>
    public String PrizePoolDifficultyBoundary;

    /// <summary>
    /// 在线玩家协议金币总数
    /// </summary>
    public long TotalOnlineCurrency;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj.getJSONObject("error_response");
        if (t != null && !t.isNullObject())
        {
            ErrCode = t.getString("code");
            ErrMsg = t.getString("msg");
        }
        else
        {
            t = jsonObj.getJSONObject("butler_get_global_infomation_response");
            if (t.has("total_registered_count"))
                TotalRegisteredCount = t.getLong("total_registered_count");
            if (t.has("today_registered_count"))
                TodayRegisteredCount = t.getLong("today_registered_count");
            if (t.has("user_online_count"))
                UserOnlineCount = t.getLong("user_online_count");
            if (t.has("guild_count"))
                GuildCount = t.getLong("guild_count");
            if (t.has("block_user_count"))
                BlockUserCount = t.getLong("block_user_count");
            if (t.has("currency_stock"))
                CurrencyStock = t.getLong("currency_stock");
            if (t.has("diamond_stock"))
                DiamondStock = t.getLong("diamond_stock");
            if (t.has("integral_stock"))
                IntegralStock = t.getLong("integral_stock");
            if (t.has("ticket_stock"))
                TicketStock = t.getLong("ticket_stock");
            if (t.has("warhead1_stock"))
                Warhead1Stock = t.getLong("warhead1_stock");
            if (t.has("warhead2_stock"))
                Warhead2Stock = t.getLong("warhead2_stock");
            if (t.has("warhead3_stock"))
                Warhead3Stock = t.getLong("warhead3_stock");
            if (t.has("warhead4_stock"))
                Warhead4Stock = t.getLong("warhead4_stock");
            if (t.has("total_recharge"))
                TotalRecharge = t.getLong("total_recharge");
            if (t.has("today_recharge"))
                TodayRecharge = t.getLong("today_recharge");
            if (t.has("businessman_count"))
                BusinessmanCount = t.getLong("businessman_count");
            if (t.has("bank_currency_stock"))
                BankCurrencyStock = t.getLong("bank_currency_stock");
            if (t.has("global_prize_pool"))
                GlobalPrizePool = t.getLong("global_prize_pool");
            if (t.has("global_game_difficulty_level"))
                GlobalGameDifficultyLevel = t.getLong("global_game_difficulty_level");
            if (t.has("prize_pool_auto_fetch_boundary"))
                PrizePoolAutoFetchBoundary = t.getLong("prize_pool_auto_fetch_boundary");
            if (t.has("prize_pool_auto_fetchc_d"))
                PrizePoolAutoFetchCD = t.getLong("prize_pool_auto_fetchc_d");
            if (t.has("prize_pool_auto_fetch_rate"))
                PrizePoolAutoFetchRate = t.getString("prize_pool_auto_fetch_rate");
            if (t.has("prize_pool_next_auto_fetch_time"))
                PrizePoolNextAutoFetchTime = t.getString("prize_pool_next_auto_fetch_time");
            if (t.has("prize_pool_share_bonus_boundary"))
                PrizePoolShareBonusBoundary = t.getLong("prize_pool_share_bonus_boundary");
            if (t.has("prize_pool_share_bonus_rate"))
                PrizePoolShareBonusRate = t.getString("prize_pool_share_bonus_rate");
            if (t.has("prize_pool_share_bonus_addition_rate"))
                PrizePoolShareBonusAdditionRate = t.getString("prize_pool_share_bonus_addition_rate");
            if (t.has("prize_pool_share_bonusc_d"))
                PrizePoolShareBonusCD = t.getLong("prize_pool_share_bonusc_d");
            if (t.has("prize_pool_next_share_bonus_time"))
                PrizePoolNextShareBonusTime = t.getString("prize_pool_next_share_bonus_time");
            if (t.has("total_prize_pool_fetched"))
                TotalPrizePoolFetched = t.getLong("total_prize_pool_fetched");
            if (t.has("prize_pool_difficulty_boundary"))
                PrizePoolDifficultyBoundary = t.getString("prize_pool_difficulty_boundary");
            if (t.has("total_online_currency"))
                TotalOnlineCurrency = t.getLong("total_online_currency");
        }
    }
}
